package com.xiaodeng.xdblogspringboot.pojo.DTO;

import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;
@Data
public class UserDTO {
    private Integer id;
    @Pattern(regexp = "^\\S{6,18}$",message = "用户名长度必须为6-18位")
    private String username;
    @Pattern(regexp = "^\\S{6,18}$",message = "密码长度必须为6-18位")
    private String password;
    @Pattern(regexp = "^\\S{6,18}$",message = "新密码长度必须为6-18位")
    private String newPwd;
    private String nickname;
    private String userPic;
    private String phone;
    @Email(message = "邮箱格式不正确！")
    private String email;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String verificationCode; //验证码
}
